{% load url from future %}<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
    <head>
        <meta charset="utf-8">
        <title>{% block title %}{% endblock %}</title>
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.css" />
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/rewrite.css" />
        {% block extrastyle %}{% endblock %}
        {% block extrahead %}{% endblock %}
        {% block blockbots %}
        <meta name="robots" content="NONE,NOARCHIVE" />
        {% endblock %}
    </head>
    {% load i18n %}
    <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
        {% if not is_popup %}
        {% if user.is_active and user.is_staff %}
        <div class="navbar navbar-inverse">
            <div class="navbar-inner">
                <div class="container">
				<a class="brand" href="/plataforma">{% trans 'Home' %}</a>
                    <div class="nav-collapse">
                        <ul class="nav">
                            <li id="welcome" class="active">
                                <a href="/admin"> {% trans 'Welcome,' %} {% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</a>
                            </li>
                            {% url 'django-admindocs-docroot' as docsroot %}
                            {% if docsroot %}
                            <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
                            {% endif %}

                            {% url 'admin:password_change' as password_change_url %}
                                {% if password_change_url %}
                                    <li id="change_passwd"><a href="{{ password_change_url }}">{% trans 'Change password' %}</a></li>
                                {% else %}
                                    <li id="change_passwd"><a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a></li>
                                {% endif %}


                            {% url 'admin:logout' as logout_url %}
                                {% if logout_url %}
                                    <li><a href="{{ logout_url }}">{% trans 'Log out' %} </a></li>
                                {% else %}
                                    <li><a href="{{ root_path }}logout/">{% trans 'Log out' %} </a></li>
                                {% endif %}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        {% endif %}

        {% endif %}

        {% block userlinks %}{% endblock %}

        {% block mainbody %}
        <div class="main {% block coltype %}colM{% endblock %}">

            {% if messages %}
            <div class="alert alert-success">
                <ul class="messagelist">
                    {% for message in messages %}
                    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>
                        {{ message }}
                    </li>
                    {% endfor %}
                </ul>
            </div>
            {% endif %}
            
            {% block breadcrumbs %}
            <ul class="breadcrumb">
                <li><a href="/">{% trans 'Home' %}</a> <span class="divider">/</span></li>
                <li class="active">{% if title %} {{ title }}{% endif %}</li>
            </ul>
            {% endblock %}
            
            {% block pretitle %}{% endblock %}
            {% block content_title %}
                {% if title %}  
                <div class="page-header">
                    <h3>{{ title }}</h3>
                </div>
                {% endif %}
            {% endblock %}
            <div class="row-fluid show-grid">
                <div class="span9">
                    {% block content %}
                        {% block object-tools %}{% endblock %}
                        {{ content }}
                    {% endblock %}
                </div>
                <div class="span3">
                    {% block sidebar %}{% endblock %}
                </div>
            </div>
            
            {% block footer %}{% endblock %}
        </div>
        {% endblock %}
    </body>
</html>
